<!--
  description: ref
  @author: GuoSiYue
  date: 2021-11-10
 -->

<template>
    <div>
        <h2>{{message}}</h2>
        <button @click="changeMessage()">changeMessage</button>
    </div>
</template>

<script>
    import { ref } from 'vue'
    export default {
        name: "ref",
        setup() {
            const message = ref('Hello World')
            const changeMessage = () => message.value = '你好啊，×××'

            return {
                message,
                changeMessage
            }
        }
    }
</script>

<style scoped>

</style>